Option Strict On
Option Explicit On
Friend Class clsHorarioxDia
	Implements _IEntidad
	
	'##ModelId=4617F15C00CB
	Private MyOID As clsOID
	'##ModelId=4617F15C00DA
	Private colTurnosDia As Collection
	'##ModelId=4617F15C00EA
	Private MyFecha As Date
	'##ModelId=4617F15C00EB
	Private MyHoraInicio As Date
	'##ModelId=4617F15C00FA
	Private MyHoraFin As Date
	'##ModelId=4617F15C0109
	Private MyPersonID As String
	
	'##ModelId=4617F15C0119
	'##ModelId=4617F15C0129
	Private Property IEntidad_OID() As clsOID Implements _IEntidad.OID
		Get
            Return MyOID
		End Get
		Set(ByVal Value As clsOID)
			MyOID = Value
		End Set
	End Property
	
	'##ModelId=4617F15C0138
	'##ModelId=4617F15C0148
	Public Property Fecha() As Date
		Get
            Return MyFecha
		End Get
		Set(ByVal Value As Date)
			MyFecha = Value
		End Set
	End Property
	
	'##ModelId=4617F15C014D
	'##ModelId=4617F15C0167
	Public Property HoraInicio() As Date
		Get
            Return MyHoraInicio
		End Get
		Set(ByVal Value As Date)
			MyHoraInicio = Value
		End Set
	End Property
	
	'##ModelId=4617F15C016C
	'##ModelId=4617F15C0179
	Public Property HoraFin() As Date
		Get
            Return MyHoraFin
		End Get
		Set(ByVal Value As Date)
			MyHoraFin = Value
		End Set
	End Property
	
	'##ModelId=4617F15C0189
	'##ModelId=4617F15C0197
	Public Property PersonID() As String
		Get
            Return MyPersonID
		End Get
		Set(ByVal Value As String)
			MyPersonID = Value
		End Set
	End Property
	
	'##ModelId=4617F15C01A5
	Public Sub Constructor(ByRef fech As Date, ByRef Hini As Date, ByRef Hfin As Date)
		MyOID = New clsOID
		MyOID.TipoObjeto = tipoHORARIOxDIA
		Fecha = fech
		HoraInicio = Hini
		HoraFin = Hfin
		colTurnosDia = New Collection
	End Sub
	'##ModelId=4617F15C01B6
	Public Sub ConstructorParcial(ByRef Hini As Date, ByRef Hfin As Date)
		MyOID = New clsOID
		MyOID.TipoObjeto = tipoHORARIOxDIA
		HoraInicio = Hini
		HoraFin = Hfin
		colTurnosDia = New Collection
	End Sub
	'##ModelId=4617F15C01C6
	Public Sub AgregarTurno(ByRef Turno As clsTurno, ByRef key As String)
		colTurnosDia.Add(Turno, key)
	End Sub
	'##ModelId=4617F15C01D5
	Public Function ObtenerTurnos() As Collection
        Return colTurnosDia
	End Function
	'##ModelId=4617F15C01E4
	Public Function ObtenerNombreDia() As String
		Dim nombreDia As String
		Dim nroDia As Short
		
		nroDia = WeekDay(Fecha)
		Select Case nroDia
			Case 1
				nombreDia = DiaDomingo
			Case 2
				nombreDia = DiaLunes
			Case 3
				nombreDia = DiaMartes
			Case 4
				nombreDia = DiaMiercoles
			Case 5
				nombreDia = DiaJueves
			Case 6
				nombreDia = DiaViernes
			Case 7
				nombreDia = DiaSabado
		End Select
        Return nombreDia
	End Function
End Class